export default {
  methods: {
    statusPopClass (item) {
      if (this.$lodash.isEmpty(item.username) || item.audit + '' === '0') {
        return 'status-waiting'
      } else if (item.audit + '' === '1') {
        return 'status-success'
      } else {
        return 'status-refuse'
      }
    },
    statusStr (code) {
      switch (code + '') {
        case '0':
          return '审批中'
        case '1':
          return '已通过'
        case '2':
          return '已拒绝'
        case '3':
          return '已作废'
        default:
          return ''
      }
    },
    statusTagType (code) {
      switch (code + '') {
        case '0':
          return 'gray'
        case '1':
          return 'success'
        case '2':
          return 'warning'
        case '3':
          return ''
        default:
          return ''
      }
    },
    statusBadgeColor (code) {
      switch (code + '') {
        case '0':
          return '#CCC'
        case '1':
          return '#4caf50'
        case '2':
          return '#ffc107'
        case '3':
          return '#888'
        default:
          return '#888'
      }
    }
  }
}
